#!/usr/bin/env bash

SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
pushd "${SCRIPT_DIR}/b32" || exit 1

CPU_CORES=$(grep /proc/cpuinfo -e "^processor" | wc -l)
make -j ${CPU_CORES} || exit 1

read -r -p "make install ? [y/N] " input
case $input in
    [yY][eE][sS]|[yY])
		;;

    *)
       	exit 1
	    ;;
esac

sudo make install

popd
